package cn.wsalix.admin.service;

import java.util.List;
import java.util.Observer;

import org.springframework.data.domain.Pageable;

import cn.anlaser.page.QueryPage;
import cn.anlaser.service.CommonService;
import cn.wsalix.admin.entity.SysMenu;
import cn.wsalix.admin.form.MenuForm;
import cn.wsalix.admin.repository.MenuRepository;

public interface MenuService extends CommonService<MenuForm,MenuRepository,SysMenu>,Observer{

	List<SysMenu> findUnMenusByRoleId(Long roleId);
	
	List<SysMenu> findMenusByUserId(Long userId);

	SysMenu findByUrl(String currUrl);

	List<SysMenu> findUnsByPermitId(Long permitId);

	public SysMenu findByCodeOne(String code);

	public SysMenu findByNameOne(String name);

	public List<SysMenu> findsByName(String name);

	public List<SysMenu> findsByCode(String code);

	public List<SysMenu> findSubsById(Long parentId);

	public List<SysMenu> findsByParentId(Long fkId);
	
	List<SysMenu> findStepByPattern(MenuForm menuForm);

	SysMenu add(MenuForm form, SysMenu parent);

	QueryPage<SysMenu> findParentTop(MenuForm form, Pageable pageable);

	QueryPage<SysMenu> findByParent(MenuForm form, Pageable pageable);
}
